﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using DataLayer;
using DataLayer.Model.Objects;
using Overview.Components;

namespace Overview
{
    /// <summary>
    /// Interaction logic for ProfileControl.xaml
    /// </summary>
    public partial class ProfileControl : UserControl
    {
        public Profile ProfileData;
 
        public ProfileControl()
        {
            InitializeComponent();
        }
        public void LoadProfileDataToControl() {
            if (ProfileData.Image!=null)
                imgProfileImage.Source = ProfileData.Image;
           
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            var workprocessSelector = new WorkProcessSelectorControl(ref ProfileData);
            if (workprocessSelector.ShowDialog() == true)
            {
                //TODO: notify about changes
            }
            else {
                //TODO: notify about calncel
            }
        }

    }
}
